package cn.kgc.client;

import cn.kgc.pojo.DmSchedulerSeat;

import cn.kgc.fallback.DmSchedulerSeatClientFallBack;

import java.util.List;
import java.util.Map;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * Created by shang-pc on 2018/5/15.
 */
@FeignClient(name = "dm-scheduler-provider", fallback = DmSchedulerSeatClientFallBack.class)
public interface RestDmSchedulerSeatClient {
    @RequestMapping(value = "/getDmSchedulerSeatById", method = RequestMethod.POST)
    public DmSchedulerSeat getDmSchedulerSeatById(@RequestParam("id") Long id) throws Exception;

    @RequestMapping(value = "/getDmSchedulerSeatListByMap", method = RequestMethod.POST)
    public List<DmSchedulerSeat> getDmSchedulerSeatListByMap(@RequestParam Map
            <String, Object> param) throws Exception;

    @RequestMapping(value = "/getDmSchedulerSeatCountByMap", method = RequestMethod.POST)
    public Integer getDmSchedulerSeatCountByMap(@RequestParam Map
            <String, Object> param) throws Exception;

    @RequestMapping(value = "/qdtxAddDmSchedulerSeat", method = RequestMethod.POST)
    public Integer qdtxAddDmSchedulerSeat(@RequestBody DmSchedulerSeat dmSchedulerSeat) throws Exception;

    @RequestMapping(value = "/qdtxModifyDmSchedulerSeat", method = RequestMethod.POST)
    public Integer qdtxModifyDmSchedulerSeat(@RequestBody DmSchedulerSeat dmSchedulerSeat) throws Exception;

    @RequestMapping(value = "/qddelDmSchedulerSeat", method = RequestMethod.GET)
    public Integer qdtxDelDmSchedulerSeat(@RequestParam("id") Long id) throws Exception;

    //重置座位
    @RequestMapping(value = "/flushUpdateDmSchedulerSeat", method = RequestMethod.POST)
    public Integer flushUpdateDmSchedulerSeat();
}

